#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "dwgobject.h"
#include <QMainWindow>

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    QList<DwgObject *>  m_mainlist;
    DrawType curDrawType = None;         // 定义一个变量用来记录当前鼠标正在绘制哪种图元
    QPainter *m_painter = nullptr;

private slots:
    void on_actionExit_triggered();

    void on_actionNew_triggered();

    void on_actionOpen_triggered();

    void on_actionSave_triggered();

    void on_actionSaveAs_triggered();

    void on_actioncirAct1_triggered();

    void on_actionArcAct1_triggered();

    void pointTB_clicked ();

    void lineTB_clicked();

    void rectangleTB_clicked();

    void EllipseTB_clicked();

    void CurveTB_clicked();

    void TextTB_clicked();

    void SquareTB_clicked();

    void TransparentTB_clicked();

    void AngleTB_clicked();

    void LeftrightTB_clicked();
private:
    Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
